#include <stdio.h>
void RegisterSymbol(void *symbolAddr);

__attribute__((constructor)) void RegisterFoo() {
    __asm__ __volatile__ (
        "leaq	.CFile(%rip), %rdi\n\t"
        "call	_Z14RegisterSymbolPv@PLT\n\t"
    );
    return;
}

void foo() {
    printf("foo\n");
    printf("Register addr: %p \n", RegisterFoo);
    printf("foo addr: %p \n", foo);
    return;
}

__asm__ __volatile__ (
    ".section .custom,\"a\",@progbits\n\t"
    ".align 8\n"
    ".CFile:\n\t"
    ".quad 0x1111\n\t"
        );

